export class AirBags {
  public count: number;
  public delay: number;

  constructor(count: number, delay: number) {
    this.count = count;
    this.delay = delay;
  }

  deploy(event: string): void {
    console.log(
      `Deploying ${this.count} airbags in ${this.delay} seconds by ${event}`
    );
  }
}

export class Engine {
  public displacement: number;
  public cylinder: number;
  public status: 'started' | 'stopped' = 'stopped';

  constructor(displacement: number, cylinder: number) {
    this.displacement = displacement;
    this.cylinder = cylinder;
  }

  start() {
    this.status = 'started';
    console.log('Engine started');
  }

  stop() {
    this.status = 'stopped';
    console.log('Engine stopped');
  }
}
